﻿using System;
using System.Collections.Generic;

using RexToy.Xml;
using RexToy.Configuration;

namespace RexToy.UI.WinForm.Configuration
{
    class XmlWinFormConfig : ModuleConfig, IWinFormConfig
    {
        private const string WINFORM = "winform";

        public XmlWinFormConfig()
        {
            _storage = GlobalConfig.ReadEnumValue<PmlxStorage>(WINFORM, "pmlx-storage") ?? PmlxStorage.Embed;
            _locatorType = GlobalConfig.ReadType(WINFORM, "pmlx-locator");
        }

        #region IWinFormConfig Members

        private PmlxStorage _storage;
        public PmlxStorage Storage
        {
            get { return _storage; }
        }

        private Type _locatorType;
        public Type CustomizePmlxLocatorType
        {
            get { return _locatorType; }
        }

        #endregion
    }
}
